package com.xydtech.busiflw.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xydtech.common.annotation.Excel;
import com.xydtech.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 待办任务对象 busifl_waittask
 *
 * @author JHON
 * @date 2021-06-11
 */
@ApiModel(value = "待办任务对象")
public class BusiflWaitTask extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 任务编号 */
    @ApiModelProperty(notes = "任务编号")
    private Long taskId;

    /**任务批次号*/
    @ApiModelProperty(notes = "任务批次号")
    private String taskBatchId;

    /** 实例号 */
    @ApiModelProperty(notes = "实例号")
    @Excel(name = "实例号")
    private String instanceId;

    /** 流程步骤 */
    @ApiModelProperty(notes = "流程步骤")
    private Long stepId;

    /** 流程名称 */
    @Excel(name = "流程名称")
    @ApiModelProperty(notes = "流程名称")
    private String flowName;

    /** 流程步骤 */
    @Excel(name = "流程步骤")
    @ApiModelProperty(notes = "流程步骤")
    private String stepName;

    /** 归属人 */
    @ApiModelProperty(notes = "归属人")
    private Long belongTo;

    /** 提交人 */
    @ApiModelProperty(notes = "提交人")
    private Long performer;

    /** 归属人 */
    @Excel(name = "归属人")
    @ApiModelProperty(notes = "归属人")
    private String belongName;

    /** 提交人 */
    @Excel(name = "提交人")
    @ApiModelProperty(notes = "提交人")
    private String performerName;

    /** 分派策略            1-任务抢先            2-任务并发            3-任务多选并发 */
    @Excel(name = "分派策略            1-任务抢先            2-任务并发            3-任务多选并发")
    @ApiModelProperty(notes = "分派策略            1-任务抢先            2-任务并发            3-任务多选并发")
    private String taskPolicy;

    /** 接受时间(默认同创建时间，任务交接时变更) */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "接受时间(默认同创建时间，任务交接时变更)", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(notes = "接受时间(默认同创建时间，任务交接时变更)")
    private Date accepteTime;

    /** 归属机构 */
    @Excel(name = "归属机构")
    @ApiModelProperty(notes = "归属机构")
    private Long belongOrg;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(notes = "结束时间")
    private Date stopTime;

    /** 任务类型            1-暂存任务（流程第一步未提交）            2-提交任务            3-退回任务 */
    @Excel(name = "任务类型")
    @ApiModelProperty(notes = "任务类型")
    private String taskType;

    /** 状态            1-开启            0--关闭 */
    @Excel(name = "状态            1-开启            0--关闭")
    @ApiModelProperty(notes = "状态            1-开启            0--关闭")
    private String sts;

    /** 流程信息*/
    @ApiModelProperty(notes = "流程信息")
    private String keyInfo;

    /** 流程版本号*/
    @ApiModelProperty(notes = "流程版本号")
    private Long versionId;

    /**审批限时(小时)默认0代表不限时*/
    @ApiModelProperty(notes = "审批限时(小时)默认0代表不限时")
    private int timeLimit;

    /**审批等待时间(小时)*/
    @ApiModelProperty(notes = "审批等待时间(小时)")
    private int waitTime;

    /**
     * 流程类型
     */
    private String flowType;

    public String getTaskBatchId() {
        return taskBatchId;
    }

    public void setTaskBatchId(String taskBatchId) {
        this.taskBatchId = taskBatchId;
    }

    public String getFlowName() {
        return flowName;
    }

    public void setFlowName(String flowName) {
        this.flowName = flowName;
    }

    public String getStepName() {
        return stepName;
    }

    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    public String getKeyInfo() {
        return keyInfo;
    }

    public void setKeyInfo(String keyInfo) {
        this.keyInfo = keyInfo;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setStepId(Long stepId) {
        this.stepId = stepId;
    }

    public Long getStepId() {
        return stepId;
    }

    public void setBelongTo(Long belongTo) {
        this.belongTo = belongTo;
    }

    public Long getBelongTo() {
        return belongTo;
    }

    public void setPerformer(Long performer) {
        this.performer = performer;
    }

    public Long getPerformer() {
        return performer;
    }

    public void setTaskPolicy(String taskPolicy) {
        this.taskPolicy = taskPolicy;
    }

    public String getTaskPolicy() {
        return taskPolicy;
    }

    public void setAccepteTime(Date accepteTime) {
        this.accepteTime = accepteTime;
    }

    public Date getAccepteTime() {
        return accepteTime;
    }

    public void setBelongOrg(Long belongOrg) {
        this.belongOrg = belongOrg;
    }

    public Long getBelongOrg() {
        return belongOrg;
    }

    public void setStopTime(Date stopTime) {
        this.stopTime = stopTime;
    }

    public Date getStopTime() {
        return stopTime;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setSts(String sts) {
        this.sts = sts;
    }

    public String getSts() {
        return sts;
    }

    public Long getVersionId() {
        return versionId;
    }

    public void setVersionId(Long versionId) {
        this.versionId = versionId;
    }

    public String getBelongName() {
        return belongName;
    }

    public void setBelongName(String belongName) {
        this.belongName = belongName;
    }

    public String getPerformerName() {
        return performerName;
    }

    public void setPerformerName(String performerName) {
        this.performerName = performerName;
    }

    public int getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(int timeLimit) {
        this.timeLimit = timeLimit;
    }

    public int getWaitTime() {
        return waitTime;
    }

    public void setWaitTime(int waitTime) {
        this.waitTime = waitTime;
    }

    public String getFlowType() {
        return flowType;
    }

    public void setFlowType(String flowType) {
        this.flowType = flowType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("taskId", getTaskId())
                .append("instanceId", getInstanceId())
                .append("stepId", getStepId())
                .append("belongTo", getBelongTo())
                .append("performer", getPerformer())
                .append("taskPolicy", getTaskPolicy())
                .append("createTime", getCreateTime())
                .append("accepteTime", getAccepteTime())
                .append("belongOrg", getBelongOrg())
                .append("stopTime", getStopTime())
                .append("taskType", getTaskType())
                .append("sts", getSts())
                .append("keyInfo", getKeyInfo())
                .append("versionId", getVersionId())
                .append("belongName", getBelongName())
                .append("performerName", getPerformerName())
                .toString();
    }
}
